package com.glsc.ngateway.platform.repo.costallocation;

import com.glsc.ngateway.platform.domain.costallocation.DepCostAllocation;
import com.glsc.ngateway.platform.domain.costallocation.HisDepCostAllocation;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

@Repository
public interface HisDepCostAllocationRepo extends JpaRepository<HisDepCostAllocation, Long>, JpaSpecificationExecutor<HisDepCostAllocation> {
    @Query(value = "select u  from HisDepCostAllocation u where u.systemInfoId in :hisSystemInfoIdSet")
    List<HisDepCostAllocation> queryByHisSystemInfoId(@Param("hisSystemInfoIdSet") Set<Long> hisSystemInfoIdSet);
    @Query(value = "select u  from HisDepCostAllocation u where u.systemInfoId in :ids")
    List<HisDepCostAllocation> queryByHisIds(Set<Long> ids);


    @Query(value = "select u  from HisDepCostAllocation u where u.systemInfoId = :id")
    List<HisDepCostAllocation> queryByHisSystemInfoIdOne(Long id);
}
